﻿@using NetCoreCMS.Models;
@using NetCoreCMS.Common;
@{
    Layout = "~/Areas/admin/Views/Shared/_LayoutEdit.cshtml";
    ViewBag.Title = "编辑友情链接";
    Link m = ViewData["model"] as Link;
    List<SelectListItem> siteSelectItems = ViewData["siteSelectItems"] as List<SelectListItem>;
}
@section HeaderContent{
    <script src="~/Scripts/webuploader/webuploader.min.js"></script>
}
@section Scripts{
    <script>
        $(function () {
            //初始化表单验证
            $("#form1").initValidform();
            //初始化上传控件
            $(".upload-img").InitUploader({ sendurl: "/tools/upload_ajax", swf: "/scripts/webuploader/uploader.swf" });
        });
    </script>
}
<form id="form1" method="post" action="SubmitSave?action=@ViewBag.Action&id=@ViewBag.Id">
    <!--导航栏-->
    <div class="location">
        <a href="../link_edit/index" class="back"><i class="iconfont icon-up"></i><span>返回列表页</span></a>
        <a href="../center/index" class="home"><i class="iconfont icon-home"></i><span>首页</span></a>
        <i class="arrow iconfont icon-arrow-right"></i>
        <span>插件管理</span>
        <i class="arrow iconfont icon-arrow-right"></i>
        <span>友情链接</span>
        <i class="arrow iconfont icon-arrow-right"></i>
        <span>编辑链接</span>
        <div class="clipboard">
            <span><label id="clipMess"></label></span>
            <a href="javascript:;" class="copy" onclick="copy();"><i class="iconfont icon-copy"></i><span>复制</span></a>
            <a href="javascript:;" class="paste disable" onclick="paste();"><i class="iconfont icon-log"></i><span>粘贴</span></a>
        </div>
    </div>
    <div class="line10"></div>
    <!--/导航栏-->
    <!--内容-->
    <div id="floatHead" class="content-tab-wrap">
        <div class="content-tab">
            <div class="content-tab-ul-wrap">
                <ul>
                    <li><a class="selected" href="javascript:;">编辑友情链接</a></li>
                </ul>
            </div>
        </div>
    </div>

    <div class="tab-content">
        <dl>
            <dt>标题名称</dt>
            <dd>@Html.TextBox("txtTitle", m.title, new { @class = "input normal", datatype = "*2-100", sucmsg = " " })</dd>
        </dl>
        <dl>
            <dt>审核状态</dt>
            <dd>
                <div class="rule-multi-radio">
                    @Html.RadioButton("rblIsLock", "0", m.is_lock == 0, new { id = "rblIsLock_0" })<label for="rblIsLock_0">正常</label>
                    @Html.RadioButton("rblIsLock", "1", m.is_lock == 1, new { id = "rblIsLock_1" })<label for="rblIsLock_1">待审核</label>
                </div>
            </dd>
        </dl>
        <dl>
            <dt>推荐到首页</dt>
            <dd>
                <div class="rule-single-checkbox">
                    @Html.CheckBox("cbIsRed", m.is_red == 1)
                </div>
            </dd>
        </dl>
        <dl>
            <dt>排序数字</dt>
            <dd>
                @Html.TextBox("txtSortId", m.sort_id, new { @class = "input small", datatype = "n", sucmsg = " " })
                <span class="Validform_checktip">*数字，越小越向前</span>
            </dd>
        </dl>
        <dl>
            <dt>联系人</dt>
            <dd>@Html.TextBox("txtUserName", m.user_name, new { @class = "input normal", datatype = "*0-50", sucmsg = " " })</dd>
        </dl>
        <dl>
            <dt>联系电话</dt>
            <dd>@Html.TextBox("txtUserTel", m.user_tel, new { @class = "input normal", datatype = "*0-30", sucmsg = " " })</dd>
        </dl>
        <dl>
            <dt>电子邮箱</dt>
            <dd>@Html.TextBox("txtEmail", m.email, new { @class = "input normal", datatype = "*0-50", sucmsg = " " })</dd>
        </dl>
        <dl>
            <dt>链接网址</dt>
            <dd>@Html.TextBox("txtSiteUrl", m.site_url, new { @class = "input normal", datatype = "url", sucmsg = " " })</dd>
        </dl>
        <dl>
            <dt>Logo图片</dt>
            <dd>
                @Html.TextBox("txtImgUrl", m.img_url, new { @class = "input normal upload-path" })
                <div class="upload-box upload-img"></div>
            </dd>
        </dl>
    </div>
    <!--/内容-->
    <!--工具栏-->
    <div class="page-footer">
        <div class="btn-wrap">
            <input type="submit" id="btnSubmit" class="btn" value="提交保存" />
            <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);" />
        </div>
    </div>
    <!--/工具栏-->
</form>
